// const addon = require("./addon");
// import addon from "./addon";
// import addon from "./addon-bridge.mjs";
import addon from "./addon-bridge.mjs";

interface ElectronAPI {
  send: (channel: string, data: any) => void;
}

declare global {
  interface Window {
    electron: ElectronAPI;
  }
}

const App = () => {
  return (
    <div>
      <h1>Hello World</h1>
      <button
        onClick={() => {
          console.log("test:zuoyu:", addon.hello());
          // 添加发送消息代码
          // window.electron.send("hello", "world");
        }}
      >
        Send Message
      </button>
    </div>
  );
};

export default App;
